{extend name="mainadmin@layouts/base" /}
{block name="main" }
<script type="text/javascript" src="__STATIC__/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="__STATIC__/js/highcharts/highcharts_more.js"></script>
<style>
    .h3{
        font-size: 18px;
    }
</style>
<section class="scrollable wrapper  ">
    <section class="panel panel-default ">
        {if condition="$isClearSetTip == true"}
        <header class="panel-heading font-bold red">
            检测到网站发现变化，是否要清理相关配置，<a href="{:url('mainadmin/backup_db/clear')}" class="btn btn-sm" >前往清理</a>
        </header>
        {/if}
        <div class="row m-l-none m-r-none bg-light lter">
            <div class="col-sm-6 col-md-3 padder-v b-r b-light ">
                <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-clipboard  fa-stack-1x text-white"></i>
                            <span class="easypiechart pos-abt" data-percent="100" data-line-width="4"
                                  data-track-color="#f5f5f5" data-scale-color="false" data-size="50"
                                  data-line-cap="butt" data-animate="3000" data-target="#firers"
                                  data-update="5000"></span>
                        </span>
                <span class="fl">
                    <span class="h3 block m-t-xs"><strong >{$stats.today.cloud_order_num|intval}</strong></span>
                    <small class="text-muted text-uc">今天云仓单数</small>
                </span>
                <span class="fr" >
                    <span class="h3 block m-t-xs"><strong >{$cloud_goods_number|intval}</strong></span>
                    <small class="text-muted text-uc">云仓总库存</small>
                </span>
                <div class="clearfix"></div>
            </div>

            <div class="col-sm-6 col-md-3 padder-v b-r b-light lt">
                <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-clipboard  fa-stack-1x text-white"></i>
                            <span class="easypiechart pos-abt" data-percent="100" data-line-width="4"
                                  data-track-color="#f5f5f5" data-scale-color="false" data-size="50"
                                  data-line-cap="butt" data-animate="3000" data-target="#firers"
                                  data-update="5000"></span>
                        </span>
                <span class="fl" >
                    <span class="h3 block m-t-xs"><strong >{$stats.today.entity_order_num|intval}</strong></span>
                    <small class="text-muted text-uc">今天现货单数</small>
                </span>
                <span class="fr" >
                    <span class="h3 block m-t-xs"><strong >{$shipinngStats.entity_order|intval}</strong></span>
                    <small class="text-muted text-uc">现货单待发货</small>
                </span>
                <div class="clearfix"></div>
            </div>
            <div class="col-sm-6 col-md-3 padder-v b-r b-light ">
                       <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-clipboard  fa-stack-1x text-white"></i>
                            <span class="easypiechart pos-abt" data-percent="100" data-line-width="4"
                                  data-track-color="#f5f5f5" data-scale-color="false" data-size="50"
                                  data-line-cap="butt" data-animate="3000" data-target="#firers"
                                  data-update="5000"></span>
                        </span>
                <span class="fl" >
                    <span class="h3 block m-t-xs"><strong >{$stats.today.shop_order_num|intval}</strong></span>
                    <small class="text-muted text-uc">今天直购单数</small>
                </span>
                <span class="fr" >
                    <span class="h3 block m-t-xs"><strong >{$shipinngStats.shop_order|intval}</strong></span>
                    <small class="text-muted text-uc">直购单待发货</small>
                </span>
                <div class="clearfix"></div>
            </div>
            <div class="col-sm-6 col-md-3 padder-v b-r b-light lt">
                       <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-clipboard  fa-stack-1x text-white"></i>
                            <span class="easypiechart pos-abt" data-percent="100" data-line-width="4"
                                  data-track-color="#f5f5f5" data-scale-color="false" data-size="50"
                                  data-line-cap="butt" data-animate="3000" data-target="#firers"
                                  data-update="5000"></span>
                        </span>
                <span class="fl" >
                    <span class="h3 block m-t-xs"><strong >{$stats.today.pickup_order_num|intval}</strong></span>
                    <small class="text-muted text-uc">今天提货单数</small>
                </span>
                <span class="fr" >
                    <span class="h3 block m-t-xs"><strong >{$shipinngStats.shipinngStats|intval}</strong></span>
                    <small class="text-muted text-uc">提货单待发货</small>
                </span>
                <div class="clearfix"></div>
            </div>


        </div>
    </section>
    <section class="panel panel-default ">
        <div class="row m-l-none m-r-none bg-light lter">
            <div class="col-sm-6 col-md-3 padder-v b-r b-light ">
                       <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-users fa-stack-1x text-white"></i>
                        </span>
                <a class="fl" href="{:url('channel/sys_admin.users/waitcheck')}">
                    <span class="h3 block m-t-xs"><strong id="user_num">{$userStats['wait_check_num']|intval}</strong></span>
                    <small class="text-muted text-uc">代理注册待审</small>
                </a>
                <a class="fr" href="{:url('channel/sys_admin.up_check/index')}">
                    <span class="h3 block m-t-xs"><strong id="user_role_num">{$userStats['up_check_num']|intval}</strong></span>
                    <small class="text-muted text-uc">代理升级待审</small>
                </a>
                <div class="clearfix"></div>
            </div>
            <div class="col-sm-6 col-md-3 padder-v b-r b-light lt">
                <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-yen fa-stack-1x text-white"></i>
                        </span>
                <a class="fl" href="{:url('channel/sys_admin.recharge/index')}">
                    <span class="h3 block m-t-xs"><strong id="wait_pay">{$rechargeLogNum|intval}</strong></span>
                    <small class="text-muted text-uc">充值待审核</small>
                </a>
                <a class="fr" href="{:url('channel/sys_admin.withdraw/index')}">
                    <span class="h3 block m-t-xs"><strong id="wait_withdraw">{$withdrawLogNum|intval}</strong></span>
                    <small class="text-muted text-uc">提现待审核</small>
                </a>
                <div class="clearfix"></div>
            </div>

            <div class="col-sm-6 col-md-3 padder-v b-r b-light">
                         <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-yen fa-stack-1x text-white"></i>
                        </span>
                <span class="fl" >
                    <span class="h3 block m-t-xs"><strong id="t_day_new_user">{$account.total_goods_money}</strong></span>
                    <small class="text-muted text-uc">货款总积分</small>
                </span>
                <span class="fr" >
                    <span class="h3 block m-t-xs"><strong id="y_day_new_user">{$account.total_uplevel_goods_money}</strong></span>
                    <small class="text-muted text-uc">升级货款积分</small>
                </span>
                <div class="clearfix"></div>
            </div>

            <div class="col-sm-6 col-md-3 padder-v b-r b-light lt">
                  <span class="fa-stack fa-2x pull-left m-r-sm  m-l">
                            <i class="fa fa-circle fa-stack-2x text-bu"></i>
                            <i class="fa fa-yen  fa-stack-1x text-white"></i>
                            <span class="easypiechart pos-abt" data-percent="100" data-line-width="4"
                                  data-track-color="#f5f5f5" data-scale-color="false" data-size="50"
                                  data-line-cap="butt" data-animate="3000" data-target="#firers"
                                  data-update="5000"></span>
                        </span>
                <span class="fl">
                    <span class="h3 block m-t-xs" ><strong id="balance_total">{$account.balance_money}</strong></span>
                    <small class="text-muted text-uc">积分总数</small>
                </span>
                <span class="fr" href="#">
                    <span class="h3 block m-t-xs" ><strong id="bean_total">{$account.withdraw_money_total}</strong></span>
                    <small class="text-muted text-uc">累计提现</small>
                </span>
                <div class="clearfix"></div>
            </div>
        </div>
    </section>

    <div class="col-md-6">
        <section class="panel panel-default ">
            <header class="panel-heading font-bold">
                7天订单数据
                <small>（{$start_day}至{$end_day}）</small>

            </header>
            <div class="panel-body">
                <div id="container"></div>
            </div>
            <footer class="panel-footer bg-white no-padder">
                <div class="row text-center no-gutter">
                    <div class="col-xs-4 b-r b-light">
                        <span class="h3 font-bold m-t block">{$stats.seven_cloud_order_num|intval} / ￥{$stats.seven_cloud_order_amount}</span>
                        <small class="text-muted m-b block">云仓订单</small>
                    </div>
                    <div class="col-xs-4 b-r b-light">
                        <span class="h3 font-bold m-t block">{$stats.seven_entity_order_num|intval} / ￥{$stats.seven_entity_order_amount}</span>
                        <small class="text-muted m-b block">现货订单</small>
                    </div>
                    <div class="col-xs-4">
                        <span class="h3 font-bold m-t block">{$stats.seven_shop_order_num|intval} / ￥{$stats.seven_shop_order_amount}</span>
                        <small class="text-muted m-b block">直购订单</small>
                    </div>

                </div>
            </footer>
        </section>
    </div>
    <div class="col-md-4">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">
                7天流水
                <small>（{$start_day}至{$end_day}）</small>
            </header>
            <div class="panel-body">
                <div id="total_money"></div>
            </div>
            <footer class="panel-footer bg-white no-padder">
                <div class="row text-center no-gutter">
                    <div class="col-xs-4 b-r b-light">
                        <span class="h3 font-bold m-t block">￥{$stats.seven_uplevel_goods_money}</span>
                        <small class="text-muted m-b block">升级货款入帐</small>
                    </div>
                    <div class="col-xs-4 b-r b-light">
                        <span class="h3 font-bold m-t block">￥{$stats.seven_goods_money}</span>
                        <small class="text-muted m-b block">货款入帐</small>
                    </div>
                    <div class="col-xs-4">
                        <span class="h3 font-bold m-t block">￥{$stats.seven_brokerage}</span>
                        <small class="text-muted m-b block">产生佣金</small>
                    </div>
                </div>
            </footer>
        </section>
    </div>
    <div class="col-md-2">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">
                代理统计
            </header>
            <div class="panel-body">
                {volist name="proxyLevelList" id="vo"}
                <div class="m-b-md">{$vo.proxy_name}：{$proxyTotal[$vo['proxy_id']]|intval}</div>
                {/volist}
            </div>
        </section>
    </div>
</section>
<script type="text/javascript">
    $(function () {
        $('#container').highcharts({
            chart: {type: 'spline'},
            title: {text: ''},
            subtitle: {text: ''},
            xAxis: { categories: {$riqi|raw}},
            yAxis: {
                title: {text: ''},
                min: 0
            },
            tooltip: {
                formatter: function () {
                    return '<b>时间:' + this.x + '</b><br>' + this.series.name +  this.y + '';
                }
            },
            series: [{
                name: '云仓订单 <span style="color:gray" >￥</span>',
                data: {$stats.seven_cloud_order_arr|json_encode|raw}
            },{
                name: '现货订单 <span style="color:gray" >￥</span>',
                data: {$stats.seven_entity_order_arr|json_encode|raw}
            },{
                name: '直购订单 <span style="color:gray" >￥</span>',
                data: {$stats.seven_shop_order_arr|json_encode|raw}
            }]
        });


        $('#total_money').highcharts({
            chart: {type: 'spline'},
            title: {text: ''},
            subtitle: {text: ''},
            xAxis: { categories: {$riqi|raw}},
            yAxis: {
                title: {text: ''},
                min: 0
            },
            tooltip: {
                formatter: function () {
                    return '<b>时间:' + this.x + '</b><br>' + this.series.name  + this.y + '';
                }
            },
            series: [{
                name: '升级货款入帐 ￥',
                data: {$stats.seven_uplevel_goods_money_arr|json_encode|raw}
            },{
                name: '货款入帐 ￥',
                data: {$stats.seven_goods_money_arr|json_encode|raw}
            },{
                name: '产生佣金 ￥',
                data: {$stats.seven_brokerage_arr|json_encode|raw}
            }]
        });

    });
    </script>
</section>

{/block}
